<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    #lb{color: green}
    .a1{color: yellow}
    input[type="text"],body>p{background-color: red}
    body>div>div>p{color: pink}
    body div div p{background-color: yellow}
    /*未访问状态*/a:link{color: green}
    /*访问过状态*/a:visited{color: red}
    /*悬停的状态*/a:hover{color: yellow}
    /*点击/激活状态*/a:active{color: pink}
  </style>
</head>
<body>
<ul>
  <li >刘备</li>
  <li id="lb">关羽</li>
  <li class="a1">张飞</li>
</ul>
<p >香蕉</p>
<p class="a1">苹果</p>
<input type="text" placeholder="用户名">
<input type="password" placeholder="密码">
<div>
  <p>p1</p>
  <div><p>p2</p></div>
  <div><div><p>p3</p></div></div>
</div>
<a href="http://www.tedu.com">达内官网</a>
</body>
</html>